<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@taglib prefix="b" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>用户管理</title>
</head>
<body>
	<h3>welcome! ${user1.userName}</h3>
	<a href="<%=basePath%>account/register">添加用户</a>
	<h4>用户检索</h4>
	<form:form modelAttribute="lookUpUser" method="POST">
		<h2>用户名</h2>
        <div>
          <form:input path="userName"/>
          <form:errors path="userName"></form:errors>
        </div>
        <button type="submit">搜索</button>
	</form:form>
	<h4>用户列表</h4>
	<a href="<%=basePath%>account/updateUser">修改密码</a>
	<a href="<%=basePath%>account/deleteUser">删除用户</a>
	<table>
		<tr>
    		<th>用户名</th>
    		<th>密码 </th>
  		</tr>
  		<tr>
    		<td>${lookUpUser.userName}</td>
    		<td>${lookUpUser.password}</td>
 		</tr>
   	</table>
</body>
</html>